<?php
class db{
	/*
	 * "mysql" Banco de dados MySQL
	 */
	static $sgbd     = "mysql";
	static $database = "angelsis";
	static $server   = "localhost";
	static $username = "root";
	static $passwd   = "es7mYTP";
	
	static function conecta(){
		switch(db::$sgbd){
			case "mysql":
				$conexao = mysql_connect(db::$server, db::$username, db::$passwd);
				mysql_select_db(db::$database);
				return $conexao;
			break;
		}
	}
	
	static function query($sql, $conexao){
		switch(db::$sgbd){
			case "mysql":
				return mysql_query($sql, $conexao);
			break;
		}
	}
	
	static function fetch_array($result){
		switch(db::$sgbd){
			case "mysql":
				return mysql_fetch_array($result);
				break;
		}
	}
	
	static function close($conexao){
		switch(db::$sgbd){
			case "mysql":
				return mysql_close($conexao);
			break;
		}
	}
}
?>
